home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qcheckbox.h.z / qcheckbox.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  1.6 KB  |  62 lines

  1. /****************************************************************************
  2. ** $Id: qcheckbox.h,v 2.7 1998/07/03 00:09:48 hanord Exp $
  3. **
  4. ** Definition of QCheckBox class
  5. **
  6. ** Created : 940222
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QCHECKBOX_H
  25. #define QCHECKBOX_H
  26.  
  27. #ifndef QT_H
  28. #include "qbutton.h"
  29. #endif // QT_H
  30.  
  31.  
  32. class QCheckBox : public QButton
  33. {
  34.     Q_OBJECT
  35. public:
  36.     QCheckBox( QWidget *parent=0, const char *name=0 );
  37.     QCheckBox( const char *text, QWidget *parent, const char *name=0 );
  38.  
  39.     bool    isChecked() const;
  40.     void    setChecked( bool check );
  41.  
  42.     QSize sizeHint() const;
  43.  
  44. protected:
  45.     void    drawButton( QPainter * );
  46.     void    drawButtonLabel( QPainter * );
  47.  
  48. private:    // Disabled copy constructor and operator=
  49.     QCheckBox( const QCheckBox & );
  50.     QCheckBox &operator=( const QCheckBox & );
  51. };
  52.  
  53.  
  54. inline bool QCheckBox::isChecked() const
  55. { return isOn(); }
  56.  
  57. inline void QCheckBox::setChecked( bool check )
  58. { setOn( check ); }
  59.  
  60.  
  61. #endif // QCHECKBOX_H
  62.